#ifndef _QANSIPALETTE_H
#define _QANSIPALETTE_H


#include "qansieditor.h"
#include <QtGui/QWidget>


namespace QAnsiEditor {


class QAnsiPalette : public QWidget
{
    Q_OBJECT

public:
    QAnsiPalette(QWidget *parent=0);
    virtual QSize sizeHint() const;
    static QColor ansiColor(int index);

signals:
    void colorChanged(char chColor);

protected:
    void paintEvent(QPaintEvent *pe);
    void mouseReleaseEvent(QMouseEvent *me);

private:
    int m_iForeIndex;
    int m_iBackIndex;

};


}  // namespace QAnsiEditor


#endif  // QANSIPALETTE_H
